package com.xx.tools.controller.cjb;

import com.xx.bili.domain.BiLiAccount;
import com.xx.bili.service.IBiLiAccountService;
import com.xx.common.core.controller.BaseController;
import com.xx.common.core.domain.AjaxResult;
import com.xx.common.core.page.TableDataInfo;
import com.xx.common.utils.DateUtils;
import com.xx.tools.dto.cjb.Cjb;
import com.xx.tools.service.cjb.ICjbService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.UUID;

/**
 * 哔哩账号Controller
 *
 * @author ruoyi
 * @date 2024-09-28
 */
@RestController
@RequestMapping("/cjb")
public class CjbController extends BaseController
{
    @Autowired
    private ICjbService cjbService;

    /**
     * 查询列表
     */
    @GetMapping("/list")
    public TableDataInfo list(Cjb cjb)
    {
        startPage();
        List<Cjb> list = cjbService.list(cjb);
        return getDataTable(list);
    }

    /**
     * 获取
     */
    @GetMapping(value = "/{id}")
    public AjaxResult getInfo(@PathVariable("id") String id)
    {
        return success(cjbService.getInfo(id));
    }

    /**
     * 新增
     */
    @PostMapping
    public AjaxResult add(@RequestBody Cjb cjb)
    {
        return toAjax(cjbService.add(cjb));
    }


}
